<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%@ taglib prefix="huoyun" uri="/huoyun"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>车源管理</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">

<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/main.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/theme/css/style_userCenter.css">
<link rel="stylesheet" type="text/css"
	href="${pageContext.request.contextPath}/car/css/cars-cx.css">
<script type="text/javascript"
	src="${pageContext.request.contextPath}/theme/js/jquery-1.6.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/car/js/jweather-by-chengxin.js"></script>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/car/js/car-tzh.js"></script>
<script type="text/javascript">
	function add_event(tr) {
		tr.onmouseover = function() {
			tr.className += ' hover';
		};
		tr.onmouseout = function() {
			tr.className = tr.className.replace(' hover', '');
		};
	}

	function stripe(table) {
		var trs = table.getElementsByTagName("tr");
		for ( var i = 1; i < trs.length; i++) {
			var tr = trs[i];
			tr.className = i % 2 != 0 ? 'odd' : 'even';
			add_event(tr);
		}
	}

	window.onload = function() {
		var table = document.getElementById('my_registed_cars_table');
		stripe(table);
	}
</script>

<style type="text/css">
#submit_button {
	width: 100px;
	height: 40px;
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_normal.png");
	background-size: 100% 100%;
	border: none;
	cursor: pointer;
	font-family: 宋体;
	font-size: 18px;
	font-style: normal;
	color: #fff;
	font-weight: bold;
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_normal_ie.png")
		\9;
}

#submit_button:hover,#submit_button.hover {
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_hover.png");
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_hover_ie.png")
		\9;
}

#submit_button:active,#submit_button.active {
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_down.png");
	background-image:
		url("${pageContext.request.contextPath}/theme/images/button_down_ie.png")
		\9;
}
</style>
</head>

<body>
	<div>
		<jsp:include page="../userAdmin/nav.jsp">
			<jsp:param value="nav_main" name="nav" />
		</jsp:include>
	</div>
	<div class="realCer">

		<!--主体部分-->
		<div class="realMain clearfix mt10">
			<!--左侧菜单-->
			<div class="realLeft" id="meunLeft">
				<jsp:include page="../userAdmin/leftMenu.jsp">
					<jsp:param value="con_nav_main" name="con_nav" />
					<jsp:param value="showMyRegistedCars" name="selectMenu"/>
				</jsp:include>
			</div>
			<!--中间-->
			<div class="realRight ml10">
				<!--中间-->
				<div class="realR_left">
					<div class="box" style="width:805px;">
						<div class="tit">
							<strong>车辆管理</strong>
						</div>
						<div class="con">
							<div id="my_registed_cars_div" class="form_wrap clearfix">
								<s:if test="myRegistedCarsList.size() != 0">
									<table id="my_registed_cars_table">
										<tr style="background-color: silver;">
											<th>序号</th>
											<th>车牌号</th>
											<th>司机</th>
											<th>车辆所有人</th>
											<th>车辆类型</th>
											<th>最大可载吨位</th>
											<th>车厢规格(长&times;宽&times;高)</th>
											<th>审核状态</th>
											<th>操作</th>
										</tr>
										<s:iterator value="myRegistedCarsList" id="myCar" status="st">
											<tr>
												<td><s:property value="#st.index+1" />
												</td>
												<td><s:property value="#myCar.cardNumber" />
												</td>
												<td><s:property value="#myCar.driverName"/>
												</td>
												<td><s:property value="#myCar.owner" />
												</td>
												<td><huoyun:customSelect mode="requiredCarType" value="${myCar.type }" type="view"/>
												</td>
												<td><s:property value="#myCar.loadMax" />&nbsp;吨
												</td>
												<td><s:property value="#myCar.length"/>米&times;<s:property value="#myCar.width"/>米&times;<s:property value="#myCar.height"/>米
												</td>
												<td>
													<s:if test="#myCar.status == -1">待审核</s:if>
													<s:elseif test="#myCar.status == 0">未通过</s:elseif>
													<s:elseif test="#myCar.status == 1">已通过</s:elseif>
												</td>
												<td><a
													href="<s:url action="editRegistedCar.action?carId=%{#myCar.id}" namespace="/car"></s:url>">修改</a>
												</td>
											</tr>
										</s:iterator>
									</table>
									<div style="width:100%; text-align:right;">
										<br>
										<font></font><a href="<s:url action="selectRegCarMethod.action" namespace="/car"></s:url>">注册新车辆</a>
										<br>
									</div>
								</s:if>
								<s:else>
									<div style="width:550px; text-align:center;">
										<p>
											<strong>
												<font size="5">您尚未注册任何车辆!<a href="<s:url action="selectRegCarMethod.action" namespace="/car"></s:url>">立即注册</a></font>
											</strong>
										</p>
									</div>
								</s:else>
							</div>
						</div>
					</div>
				</div>
				<!-- 中间 -->
			</div>
			<!--中由-->
		</div>
	</div>
	<div>
		<jsp:include page="../footer.jsp"></jsp:include>
	</div>
</body>
</html>
